<?php

class mdlCategorias extends Zend_Db_Table_Abstract
{

    protected $_schema = 'moodle';
    protected $_name = 'moodle.mdl_course_categories';

    public function getCategoria($id)
    {
        $id = (int)$id;
        $row = $this->fetchRow('id = ' . $id);
        if (!$row) {
            throw new Exception("moodle.mdl_course_categories não localizado: $id");
        }
        return $row;
    }
}